package com.huike.web.controller.clues;

import java.util.List;

import com.huike.clues.domain.vo.InsertRecord;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import com.huike.clues.domain.TbClueTrackRecord;
import com.huike.clues.service.ITbClueTrackRecordService;
import com.huike.common.core.controller.BaseController;
import com.huike.common.core.domain.AjaxResult;
import com.huike.common.core.page.TableDataInfo;


/**
 * 线索跟进记录Controller
 * @date 2021-04-22
 */
@RestController
@RequestMapping("/clues/record")
public class TbClueTrackRecordController extends BaseController {
    @Autowired
    ITbClueTrackRecordService itbClueTrackRecordService;
    @GetMapping("/list")
    public TableDataInfo list(TbClueTrackRecord tbClueTrackRecord){
        startPage();
        List<TbClueTrackRecord> tbClueTrackRecords = itbClueTrackRecordService.selectTbClueTrackRecordList(tbClueTrackRecord);
        return getDataTable(tbClueTrackRecords);

    }
    @PostMapping
    public AjaxResult insertRecord(@RequestBody InsertRecord insertRecord){
        itbClueTrackRecordService.insertTbClueTrackRecord(insertRecord);
        return AjaxResult.success();
    }

}